﻿using System;
using System.Globalization;

class ParsingDoubles
{
    private static double value;

    private static void ParseDouble(string input)
    {
        CultureInfo currentCulture = new CultureInfo("");
        currentCulture.NumberFormat.NumberDecimalSeparator = ",";
        currentCulture.NumberFormat.NumberGroupSeparator = " ";
        if (double.TryParse(input, NumberStyles.Currency, currentCulture, out value))
        {
            return;
        }
        currentCulture.NumberFormat.NumberDecimalSeparator = ".";
        if (double.TryParse(input, NumberStyles.Currency, currentCulture, out value))
        {
            return;
        }
    }

    static void Main()
    {
        string input = Console.ReadLine();
        ParseDouble(input);

        Console.WriteLine(value);
    }
}
